home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_fetchmail.idb / usr / freeware / catman / u_man / cat1 / fetchmail.Z / fetchmail
Encoding:
Text File  |  1998-10-28  |  77.8 KB  |  1,849 lines

  1.  
  2.  
  3.  
  4.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.       fetchmail - fetch mail from a    POP, IMAP, or ETRN-capable
  10.       server
  11.  
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.       ffffeeeettttcccchhhhmmmmaaaaiiiillll [_o_p_t_i_o_n_s] [_m_a_i_l_s_e_r_v_e_r...]
  15.  
  16.  
  17.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  18.       _f_e_t_c_h_m_a_i_l is a mail-retrieval    and forwarding utility;    it
  19.       fetches mail from remote mailservers and forwards it to your
  20.       local    (client) machine's delivery system.  You can then
  21.       handle the retrieved mail using normal mail user agents such
  22.       as _e_l_m(1) or _M_a_i_l(1).     The ffffeeeettttcccchhhhmmmmaaaaiiiillll utility can be run in a
  23.       daemon mode to repeatedly poll one or    more systems at    a
  24.       specified interval.
  25.  
  26.       The _f_e_t_c_h_m_a_i_l    program    can gather mail    from servers
  27.       supporting any of the    common mail-retrieval protocols: POP2,
  28.       POP3,    IMAP2bis, and IMAP4.  It can also use the ESMTP    ETRN
  29.       extension.  (The RFCs    describing all these protocols are
  30.       listed at the    end of this document.)
  31.  
  32.       While    _f_e_t_c_h_m_a_i_l is primarily intended    to be used over    on-
  33.       demand TCP/IP    links (such as SLIP or PPP connections), it
  34.       may also be useful as    a message transfer agent for sites
  35.       which    refuse for security reasons to permit (sender-
  36.       initiated) SMTP transactions with sendmail.
  37.  
  38.       As each message is retrieved _f_e_t_c_h_m_a_i_l normally delivers it
  39.       via SMTP to port 25 on the machine it    is running on
  40.       (localhost), just as though it were being passed in over a
  41.       normal TCP/IP    link.  The mail    will then be delivered locally
  42.       via your system's MDA    (Mail Delivery Agent, usually
  43.       _s_e_n_d_m_a_i_l(8) but your system may use a    different one such as
  44.       _s_m_a_i_l, _m_m_d_f, or _q_m_a_i_l).  All the delivery-control mechanisms
  45.       (such    as ._f_o_r_w_a_r_d files) normally available through your
  46.       system MDA and local delivery    agents will therefore work.
  47.  
  48.       The behavior of _f_e_t_c_h_m_a_i_l is controlled by command-line
  49.       options and a    run control file, ~/._f_e_t_c_h_m_a_i_l_r_c, the syntax
  50.       of which we describe below.  Command-line options override
  51.       ~/._f_e_t_c_h_m_a_i_l_r_c declarations.
  52.  
  53.       Each server name that    you specify following the options on
  54.       the command line will    be queried.  If    you don't specify any
  55.       servers on the command line, each server in your
  56.       ~/._f_e_t_c_h_m_a_i_l_r_c file will be queried.
  57.  
  58.       To facilitate    the use    of _f_e_t_c_h_m_a_i_l In    scripts, pipelines,
  59.       etc.,    it returns an appropriate exit code upon termination
  60.  
  61.  
  62.  
  63.      Page 1                          (printed 6/9/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  71.  
  72.  
  73.  
  74.       -- see EXIT CODES below.
  75.  
  76.  
  77.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  78.       The following    options    modify the behavior of _f_e_t_c_h_m_a_i_l.  It
  79.       is seldom necessary to specify any of    these once you have a
  80.       working ._f_e_t_c_h_m_a_i_l_r_c file set    up.
  81.  
  82.       Almost all options have a corresponding keyword which    can be
  83.       used to declare them in a _f_e_t_c_h_m_a_i_l_r_c    file.
  84.  
  85.       Some special options are not covered here, but are
  86.       documented insttead in sections on AUTHENTICATION and    DAEMON
  87.       MODE which follows.
  88.  
  89.     GGGGeeeennnneeeerrrraaaallll    OOOOppppttttiiiioooonnnnssss
  90.       ----VVVV,,,, --------vvvveeeerrrrssssiiiioooonnnn
  91.            Displays    the version information    for your copy of
  92.            _f_e_t_c_h_m_a_i_l. No mail fetch    is performed.  Instead,    for
  93.            each server specified, all option information that
  94.            would be    computed if _f_e_t_c_h_m_a_i_l. were connecting to that
  95.            server is displayed.  Any non-printables    in passwords
  96.            or other    string names are shown as backslashed C-like
  97.            escape sequences.  This option is useful    for verifying
  98.            that your options are set the way you want them.
  99.  
  100.       ----cccc,,,, --------cccchhhheeeecccckkkk
  101.            Return a    status code to indicate    whether    there is mail
  102.            waiting,    without    actually fetching or deleting mail
  103.            (see EXIT CODES below).    This option turns off daemon
  104.            mode (in    which it would be useless).  It    doesn't    play
  105.            well with queries to multiple sites, and    doesn't    work
  106.            with ETRN.  It will return a false positive if you
  107.            leave read but undeleted    mail in    your server mailbox
  108.            and your    fetch protocol can't tell kept messages    from
  109.            new ones.  This means it    will work with IMAP, not work
  110.            with POP2, and may occasionally flake out under POP3.
  111.  
  112.       ----ssss,,,, --------ssssiiiilllleeeennnntttt
  113.            Silent mode.  Suppresses    all progress/status messages
  114.            that are    normally echoed    to standard error during a
  115.            fetch.  The --verbose option overrides this.
  116.  
  117.       ----vvvv,,,, --------vvvveeeerrrrbbbboooosssseeee
  118.            Verbose mode.  All control messages passed between
  119.            _f_e_t_c_h_m_a_i_l and the mailserver are    echoed to stderr.
  120.            Overrides --silent.
  121.  
  122.     DDDDiiiissssppppoooossssaaaallll OOOOppppttttiiiioooonnnnssss
  123.       ----aaaa,,,, --------aaaallllllll
  124.            (Keyword: fetchall) Retrieve both old (seen) and    new
  125.            messages    from the mailserver.  The default is to    fetch
  126.  
  127.  
  128.  
  129.      Page 2                          (printed 6/9/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  137.  
  138.  
  139.  
  140.            only messages the server    has not    marked seen.  Note
  141.            that POP2 retrieval behaves as though --all is always
  142.            on (see RETRIEVAL FAILURE MODES below) and this option
  143.            does not    work with ETRN.
  144.  
  145.       ----kkkk,,,, --------kkkkeeeeeeeepppp
  146.            (Keyword: keep) Keep retrieved messages on the remote
  147.            mailserver.  Normally, messages are deleted from    the
  148.            folder on the mailserver    after they have    been
  149.            retrieved.  Specifying the kkkkeeeeeeeepppp option causes retrieved
  150.            messages    to remain in your folder on the    mailserver.
  151.            This option does    not work with ETRN.
  152.  
  153.       ----KKKK,,,, --------nnnnooookkkkeeeeeeeepppp
  154.            (Keyword: nokeep) Delete    retrieved messages from    the
  155.            remote mailserver.  This    option forces retrieved    mail
  156.            to be deleted.  It may be useful    if you have specified
  157.            a default of kkkkeeeeeeeepppp in your
  158.  
  159.       ----FFFF,,,, --------fffflllluuuusssshhhh
  160.            POP3/IMAP only.    Delete old (previously retrieved)
  161.            messages    from the mailserver before retrieving new
  162.            messages. This option does not work with    ETRN.
  163.  
  164.     PPPPrrrroooottttooooccccoooollll aaaannnndddd QQQQuuuueeeerrrryyyy OOOOppppttttiiiioooonnnnssss
  165.       ----pppp,,,, --------pppprrrroooottttooooccccoooollll pppprrrroooottttoooo
  166.            (Keyword: proto[col]) Specify the protocol to used when
  167.            communicating with the remote mailserver.  If no
  168.            protocol    is specified, _f_e_t_c_h_m_a_i_l    will try each of the
  169.            supported protocols in turn, terminating    after any
  170.            successful attempt.  _p_r_o_t_o may be one of    the following:
  171.  
  172.            POP2 Post Office    Protocol 2
  173.  
  174.            POP3 Post Office    Protocol 3
  175.  
  176.            APOP Use    POP3 with MD5 authentication.
  177.  
  178.            RPOP Use    POP3 with RPOP authentication.
  179.  
  180.            KPOP Use    POP3 with Kerberos V4 authentication on    port
  181.             1109.
  182.  
  183.            IMAP IMAP2bis, IMAP4, or    IMAP4rev1 (_f_e_t_c_h_m_a_i_l
  184.             autodetects    their capabilities).
  185.  
  186.            IMAP-K4
  187.             IMAP4, or IMAP4rev1    (_f_e_t_c_h_m_a_i_l autodetects their
  188.             capabilities) with RFC 1731    Kerberos v4
  189.             authentication.
  190.  
  191.            ETRN Use    the ESMTP ETRN option.
  192.  
  193.  
  194.  
  195.      Page 3                          (printed 6/9/98)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  203.  
  204.  
  205.  
  206.       All these alternatives work in basically the same way
  207.       (communicating with standard server daemons to fetch mail
  208.       already delivered to a mailbox on the    server)    except ETRN.
  209.       The ETRN mode    allows you to ask a compliant ESMTP server
  210.       (such    as BSD sendmail    at release 8.8.0 or higher) to
  211.       immediately open a sender-SMTP connection to your client
  212.       machine and begin forwarding any items addressed to your
  213.       client machine in the    server's queue of undelivered mail.
  214.  
  215.       ----UUUU,,,, --------uuuuiiiiddddllll
  216.            (Keyword: uidl) Force UIDL use (effective only with
  217.            POP3).  Force client-side tracking of `newness' of
  218.            messages    (UIDL stands for ``unique ID listing'' and is
  219.            described in RFC1725).  Use with    `keep' to use a
  220.            mailbox as a baby news drop for a group of users.
  221.  
  222.       ----PPPP,,,, --------ppppoooorrrrtttt
  223.            (Keyword: port) The  option permits you to specify a
  224.            TCP/IP port to connect on. This option will seldom be
  225.            necessary as all    the supported protocols    have well-
  226.            established default port    numbers.
  227.  
  228.       ----rrrr ffffoooollllddddeeeerrrr,,,, --------ffffoooollllddddeeeerrrr ffffoooollllddddeeeerrrr
  229.            (Keyword: folder[s]) Causes a specified non-default
  230.            mail folder on the mailserver (or comma-separated list
  231.            of folders) to be retrieved.  The syntax    of the folder
  232.            name is server-dependent.  This option is not available
  233.            under POP3 or ETRN.
  234.  
  235.     DDDDeeeelllliiiivvvveeeerrrryyyy CCCCoooonnnnttttrrrroooollll OOOOppppttttiiiioooonnnnssss
  236.       ----SSSS hhhhoooosssstttt,,,, --------ssssmmmmttttpppphhhhoooosssstttt hhhhoooosssstttt
  237.            (Keyword: smtp[host]) Specify a hunt list of hosts to
  238.            forward mail to (one or more hostnames, comma-
  239.            separated).  In ETRN mode, set the host that the
  240.            mailserver is asked to ship mail    to.  Hosts are tried
  241.            in list order; the first    one that is up becomes the
  242.            forwarding or ETRN target for the current run.
  243.  
  244.       ----mmmm,,,, --------mmmmddddaaaa
  245.            (Keyword: mda) You can force mail to be passed to an
  246.            MDA directly (rather than forwarded to port 25) with
  247.            the -mda    or -m option.  If _f_e_t_c_h_m_a_i_l is running as
  248.            root, it    sets its userid    to that    of the target user
  249.            while delivering    mail through an    MDA.  Some possible
  250.            MDAs are    "/usr/sbin/sendmail -oem", "/usr/lib/sendmail
  251.            -oem", "/usr/bin/formail", and "/usr/bin/deliver".
  252.            Local delivery addresses    will be    inserted into the MDA
  253.            command wherever    you place a %T;    the mail message's
  254.            From address will be inserted where you place an    %F.
  255.            Do _n_o_t use an MDA invocation like "sendmail -oem    -t"
  256.            that dispatches on the contents of To/Cc/Bcc, it    will
  257.            create mail loops and bring the just wrath of many
  258.  
  259.  
  260.  
  261.      Page 4                          (printed 6/9/98)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  269.  
  270.  
  271.  
  272.            postmasters down    upon your head.
  273.  
  274.     RRRReeeessssoooouuuurrrrcccceeee LLLLiiiimmmmiiiitttt CCCCoooonnnnttttrrrroooollll OOOOppppttttiiiioooonnnnssss
  275.       ----llll,,,, --------lllliiiimmmmiiiitttt
  276.            (Keyword: limit)    Takes a    maximum    octet size argument.
  277.            Messages    larger than this size will not be fetched, not
  278.            be marked seen, and will    be left    on the server (in
  279.            foreground sessions, the    progress messages will note
  280.            that they are "oversized").  An explicit    --limit    of 0
  281.            overrides any limits set    in your    run control file. This
  282.            option is intended for those needing to strictly
  283.            control fetch time in interactive mode.    It may not be
  284.            used with daemon    mode, as users would never receive a
  285.            notification that messages were waiting.     This option
  286.            does not    work with ETRN.
  287.  
  288.       ----bbbb,,,, --------bbbbaaaattttcccchhhhlllliiiimmmmiiiitttt
  289.            (Keyword: batchlimit) Specify the maximum number    of
  290.            messages    that will be shipped to    an SMTP    listener
  291.            before the connection is    deliberately torn down and
  292.            rebuilt (defaults to 0, meaning no limit).  An explicit
  293.            --batchlimit of 0 overrides any limits set in your run
  294.            control file.  While sssseeeennnnddddmmmmaaaaiiiillll(8)    normally initiates
  295.            delivery    of a message immediately after receiving the
  296.            message terminator, some    SMTP listeners are not so
  297.            prompt.    MTAs like _q_m_a_i_l(8) and _s_m_a_i_l(8)    may wait till
  298.            the delivery socket is shut down    to deliver.  This may
  299.            produce annoying    delays when _f_e_t_c_h_m_a_i_l(8) is processing
  300.            very large batches.  Setting the    batch limit to some
  301.            nonzero size will prevent these delays.    This option
  302.            does not    work with ETRN.
  303.  
  304.       ----BBBB,,,, --------ffffeeeettttcccchhhhlllliiiimmmmiiiitttt
  305.            (Keyword: fetchlimit) Limit the number of messages
  306.            accepted    from a given server in a single    poll.  By
  307.            default there is    no limit. An explicit --fetchlimit of
  308.            0 overrides any limits set in your run control file.
  309.            This option does    not work with ETRN.
  310.  
  311.       ----eeee,,,, --------eeeexxxxppppuuuunnnnggggeeee
  312.            (keyword: expunge) When talking to an IMAP server,
  313.            _f_e_t_c_h_m_a_i_l normally issues an EXPUNGE command after each
  314.            deletion    in order to force the deletion to be done
  315.            immediately.  This is safest when your connection to
  316.            the server is flaky and expensive, as it    avoids
  317.            resending duplicate mail    after a    line hit.  However, on
  318.            large mailboxes the overhead of re-indexing after every
  319.            message can slam    the server pretty hard,    so if your
  320.            connection is reliable it is good to do expunges    less
  321.            frequently.  If you specify this    option to an integer
  322.            N, it tells _f_e_t_c_h_m_a_i_l to    only issue expunges on every
  323.            Nth delete.  An argument    of zero    suppresses expunges
  324.  
  325.  
  326.  
  327.      Page 5                          (printed 6/9/98)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  335.  
  336.  
  337.  
  338.            entirely    (so no expunges    at all will be done until the
  339.            end of run). This option    does not work with ETRN, POP2,
  340.            or POP3.
  341.  
  342.     AAAAuuuutttthhhheeeennnnttttiiiiccccaaaattttiiiioooonnnn OOOOppppttttiiiioooonnnnssss
  343.       ----uuuu nnnnaaaammmmeeee,,,, --------uuuusssseeeerrrrnnnnaaaammmmeeee nnnnaaaammmmeeee
  344.            (Keyword: user[name]) Specifies the user    identification
  345.            to be used when logging in to the mailserver.  The
  346.            appropriate user    identification is both server and
  347.            user-dependent. The default is your login name on the
  348.            client machine that is running _f_e_t_c_h_m_a_i_l. See USER
  349.            AUTHENTICATION below for    a complete description.
  350.  
  351.       ----IIII ssssppppeeeecccciiiiffffiiiiccccaaaattttiiiioooonnnn,,,, --------iiiinnnntttteeeerrrrffffaaaacccceeee    ssssppppeeeecccciiiiffffiiiiccccaaaattttiiiioooonnnn
  352.            (Keyword: interface) Require that a specific interface
  353.            device be up and    have a specific    local IP address (or
  354.            range) before polling.  Frequently _f_e_t_c_h_m_a_i_l is used
  355.            over a transient    point-to-point TCP/IP link established
  356.            directly    to a mailserver    via SLIP or PPP.  That is a
  357.            relatively secure channel.  But when other TCP/IP
  358.            routes to the mailserver    exist (e.g. when the link is
  359.            connected to an alternate ISP), your username and
  360.            password    may be vulnerable to snooping (especially when
  361.            daemon mode automatically polls for mail, shipping a
  362.            clear password over the net at predictable intervals).
  363.            The --interface option may be used to prevent this.
  364.            When the    specified link is not up or is not connected
  365.            to a matching IP    address, polling will be skipped.  The
  366.            format is:
  367.  
  368.             interface/iii.iii.iii.iii/mmm.mmm.mmm.mmm
  369.  
  370.            The field before    the first slash    is the interface name
  371.            (i.e. sl0, ppp0 etc.).  The field before    the second
  372.            slash is    the acceptable IP address.  The    field after
  373.            the second slash    is a mask which    specifies a range of
  374.            IP addresses to accept.    If no mask is present
  375.            255.255.255.255 is assumed (i.e.    an exact match).  This
  376.            option is currently only    supported under    Linux.
  377.  
  378.       ----MMMM iiiinnnntttteeeerrrrffffaaaacccceeee,,,,    --------mmmmoooonnnniiiittttoooorrrr iiiinnnntttteeeerrrrffffaaaacccceeee
  379.            (Keyword: monitor) Daemon mode can cause    transient
  380.            links which are automatically taken down    after a    period
  381.            of inactivity (e.g. PPP links) to remain    up
  382.            indefinitely.  This option identifies a system TCP/IP
  383.            interface to be monitored for activity.    After each
  384.            poll interval, if the link is up    but no other activity
  385.            has occurred on the link, then the poll will be
  386.            skipped.     This option is    currently only supported under
  387.            Linux.
  388.  
  389.       ----AAAA,,,, --------aaaauuuutttthhhh
  390.  
  391.  
  392.  
  393.      Page 6                          (printed 6/9/98)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  401.  
  402.  
  403.  
  404.            (Keyword: auth[enticate]) This option permits you to
  405.            specify a preauthentication type    (see USER
  406.            AUTHENTICATION below for    details).  The possible    values
  407.            are `ppppaaaasssssssswwwwoooorrrrdddd' and `kkkkeeeerrrrbbbbeeeerrrroooossss' (or, for excruciating
  408.            exactness, `kkkkeeeerrrrbbbbeeeerrrroooossss____vvvv4444').  This    option is provided
  409.            primarily for developers; choosing KPOP protocol
  410.            automatically selects Kerberos preauthentication, and
  411.            all other alternatives use password authentication
  412.            (though APOP uses a generated one-time key as the
  413.            password    and IMAP-K4 uses RFC1731 Kerberos v4
  414.            authentication).     This option does not work with    ETRN.
  415.  
  416.     MMMMiiiisssscccceeeellllllllaaaannnneeeeoooouuuussss OOOOppppttttiiiioooonnnnssss
  417.       ----ffff ppppaaaatttthhhhnnnnaaaammmmeeee,,,, --------ffffeeeettttcccchhhhmmmmaaaaiiiillllrrrrcccc ppppaaaatttthhhhnnnnaaaammmmeeee
  418.            Specify a non-default name for the ._f_e_t_c_h_m_a_i_l_r_c run
  419.            control file.  Unless the --version option is also on,
  420.            the file    must have permissions no more open than     0600
  421.            (u=rw,g=,o=) or else be /dev/null.
  422.  
  423.       ----iiii ppppaaaatttthhhhnnnnaaaammmmeeee,,,, --------iiiiddddffffiiiilllleeee    ppppaaaatttthhhhnnnnaaaammmmeeee
  424.            Specify an alternate name for the .fetchids file    used
  425.            to save POP3 UIDs.
  426.  
  427.       ----nnnn,,,, --------nnnnoooorrrreeeewwwwrrrriiiitttteeee
  428.            (Keyword: no rewrite) Normally, _f_e_t_c_h_m_a_i_l edits RFC-822
  429.            address headers (To, From, Cc, Bcc, and Reply-To) in
  430.            fetched mail so that any    mail IDs local to the server
  431.            are expanded to full addresses (@ and the mailserver
  432.            hostname    are appended).    This enables replies on    the
  433.            client to get addressed correctly (otherwise your
  434.            mailer might think they should be addressed to local
  435.            users on    the client machine!).  This option disables
  436.            the rewrite.  (This option is provided to pacify    people
  437.            who are paranoid    about having an    MTA edit mail headers
  438.            and want    to know    they can prevent it, but it is
  439.            generally not a good idea to actually turn off
  440.            rewrite.)  When using ETRN, the rewrite option is
  441.            ineffective.
  442.  
  443.       ----EEEE,,,, --------eeeennnnvvvveeeellllooooppppeeee
  444.            (Keyword: envelope) This    option changes the header
  445.            _f_e_t_c_h_m_a_i_l assumes will carry a copy of the mail's
  446.            envelope    address.  Normally this    is `X-Envelope-To' but
  447.            as this header is not standard, practice    varies.    See
  448.            the discussion of multidrop address handling below.  As
  449.            a special case, `envelope "Received"' enables parsing
  450.            of sendmail-style Received lines.  This is the default,
  451.            and it should not be necessary unless you have globally
  452.            disabled    Received parsing with `no envelope' in the
  453.            ._f_e_t_c_h_m_a_i_l_r_c file.
  454.  
  455.       ----QQQQ,,,, --------qqqqvvvviiiirrrrttttuuuuaaaallll
  456.  
  457.  
  458.  
  459.      Page 7                          (printed 6/9/98)
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  467.  
  468.  
  469.  
  470.            (Keyword: qvirtual) The string assigned to this option
  471.            will be removed from the    user name found    in the header
  472.            specified with the _e_n_v_e_l_o_p_e option.  This option    is
  473.            useful if you are using _f_e_t_c_h_m_a_i_l to collect the    mail
  474.            for an entire domain and    your ISP (or your mail
  475.            redirection provider) is    using qmail.  One of the basic
  476.            features    of qmail is the
  477.  
  478.            `Delivered-To:'
  479.  
  480.            message header.    Whenever qmail delivers    a message to a
  481.            local mailbox it    puts the username and hostname of the
  482.            envelope    recipient on this line.     The major reason for
  483.            this is to prevent mail loops.  To set up qmail to
  484.            batch mail for a    disconnected site the ISP-mailhost
  485.            will have normally put that site    in its `Virtualhosts'
  486.            control file so it will add a prefix to all mail
  487.            addresses for this site.    This results in    mail sent to
  488.            'username@userhost.userdom.dom.com' having a
  489.            `Delivered-To:' line of the form:
  490.  
  491.            Delivered-To: mbox-userstr-
  492.            username@userhost.userdom.dom.com
  493.  
  494.            The ISP can make    the 'mbox-userstr-' prefix anything
  495.            they choose but a string    matching the user host name is
  496.            likely.    By using the option `envelope Delivered-To:'
  497.            you can make fetchmail reliably identify    the original
  498.            envelope    recipient, but you have    to strip the `mbox-
  499.            userstr-' prefix    to deliver to the correct user.     This
  500.            is what this option is for.
  501.  
  502.  
  503.      UUUUSSSSEEEERRRR AAAAUUUUTTTTHHHHEEEENNNNTTTTIIIICCCCAAAATTTTIIIIOOOONNNN
  504.       Every    mode except ETRN requires authentication of the
  505.       client.  Normal user authentication in _f_e_t_c_h_m_a_i_l is very
  506.       much like the    authentication mechanism of _f_t_p(_1). The
  507.       correct user-id and password depend upon the underlying
  508.       security system at the mailserver.
  509.  
  510.       If the mailserver is a Unix machine on which you have    an
  511.       ordinary user    account, your regular login name and password
  512.       are used with    _f_e_t_c_h_m_a_i_l. If you use the same login name on
  513.       both the server and the client machines, you needn't worry
  514.       about    specifying a user-id with the ----uuuu option    -- the default
  515.       behavior is to use your login    name on    the client machine as
  516.       the user-id on the server machine.  If you use a different
  517.       login    name on    the server machine, specify that login name
  518.       with the ----uuuu option.  e.g. if your login name is 'jsmith' on
  519.       a machine named 'mailgrunt', you would start _f_e_t_c_h_m_a_i_l as
  520.       follows:
  521.  
  522.  
  523.  
  524.  
  525.      Page 8                          (printed 6/9/98)
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  533.  
  534.  
  535.  
  536.            fetchmail -u jsmith mailgrunt
  537.  
  538.       The default behavior of _f_e_t_c_h_m_a_i_l is to prompt you for your
  539.       mailserver password before the connection is established.
  540.       This is the safest way to use    _f_e_t_c_h_m_a_i_l and ensures that
  541.       your password    will not be compromised.  You may also specify
  542.       your password    in your    ~/._f_e_t_c_h_m_a_i_l_r_c file.  This is
  543.       convenient when using    _f_e_t_c_h_m_a_i_l in daemon mode or with
  544.       scripts.
  545.  
  546.       If you do not    specify    a password, and    _f_e_t_c_h_m_a_i_l cannot
  547.       extract one from your    ._f_e_t_c_h_m_a_i_l_r_c file, it will look    for a
  548.       ._n_e_t_r_c file in your home directory before requesting one
  549.       interactively; if an entry matching the mailserver is    found
  550.       in that file,    the password will be used.  See    the _f_t_p(1) man
  551.       page for details of the syntax of the    ._n_e_t_r_c file.  (This
  552.       feature may allow you    to avoid duplicating password
  553.       information in more than one file.)
  554.  
  555.       On mailservers that do not provide ordinary user accounts,
  556.       your user-id and password are    usually    assigned by the    server
  557.       administrator    when you apply for a mailbox on    the server.
  558.       Contact your server administrator if you don't know the
  559.       correct user-id and password for your    mailbox    account.
  560.  
  561.       Early    versions of POP3 (RFC1081, RFC1225) supported a    crude
  562.       form of independent authentication using the _r_h_o_s_t_s file on
  563.       the mailserver side.    Under this RPOP    variant, a fixed per-
  564.       user ID equivalent to    a password was sent in clear over a
  565.       link to a reserved port, with    the command RPOP rather    than
  566.       PASS to alert    the server that    it should do special checking.
  567.       RPOP is supported by _f_e_t_c_h_m_a_i_l (you can specify `protocol
  568.       RPOP'    to have    the program send `RPOP'    rather than `PASS')
  569.       but its use is strongly discouraged.    This facility was
  570.       vulnerable to    spoofing and was withdrawn in RFC1460.
  571.  
  572.       RFC1460 introduced APOP authentication.  In this variant of
  573.       POP3,    you register an    APOP password on your server host (the
  574.       program to do    this with on the server    is probably called
  575.       _p_o_p_a_u_t_h(8)).    You put    the same password in your ._f_e_t_c_h_m_a_i_l_r_c
  576.       file.     Each time _f_e_t_c_h_m_a_i_l logs in, it sends a
  577.       cryptographically secure hash    of your    password and the
  578.       server greeting time to the server, which can    verify it by
  579.       checking its authorization database.
  580.  
  581.       If your _f_e_t_c_h_m_a_i_l was    built with Kerberos support and    you
  582.       specify Kerberos preauthentication (either with --auth or
  583.       the ._f_e_t_c_h_m_a_i_l_r_c option aaaauuuutttthhhheeeennnnttttiiiiccccaaaatttteeee kkkkeeeerrrrbbbbeeeerrrroooossss____vvvv4444) it will
  584.       try to get a Kerberos    ticket from the    mailserver at the
  585.       start    of each    query.
  586.  
  587.       If you use IMAP-K4, _f_e_t_c_h_m_a_i_l    will expect the    IMAP server to
  588.  
  589.  
  590.  
  591.      Page 9                          (printed 6/9/98)
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  599.  
  600.  
  601.  
  602.       have RFC1731-conformant AUTHENTICATE KERBEROS_V4 capability,
  603.       and will use it.
  604.  
  605.       If you are using POP3, and the server    issues a one-time-
  606.       password challenge conforming    to RFC1938, _f_e_t_c_h_m_a_i_l will use
  607.       your password    as a pass phrase to generate the required
  608.       response. This avoids    sending    secrets    over the net
  609.       unencrypted.
  610.  
  611.       Compuserve's RPA authentication (similar to APOP) is
  612.       supported.  If you are using POP3, and the RPA code has been
  613.       compiled into    your binary, and you query a server in the
  614.       Compuserve csi.com domain, _f_e_t_c_h_m_a_i_l will try    to perform an
  615.       RPA pass-phrase authentication instead of sending over the
  616.       password en clair.
  617.  
  618.  
  619.      DDDDAAAAEEEEMMMMOOOONNNN MMMMOOOODDDDEEEE
  620.       The --------ddddaaaaeeeemmmmoooonnnn or ----dddd option runs _f_e_t_c_h_m_a_i_l in daemon mode.
  621.       You must specify a numeric argument which is a polling
  622.       interval in seconds.
  623.  
  624.       In daemon mode, _f_e_t_c_h_m_a_i_l puts itself    in background and runs
  625.       forever, querying each specified host    and then sleeping for
  626.       the given polling interval.
  627.  
  628.       Simply invoking
  629.  
  630.            fetchmail -d 900
  631.  
  632.       will,    therefore, poll    all the    hosts described    in your
  633.       ~/._f_e_t_c_h_m_a_i_l_r_c file (except those explicitly excluded    with
  634.       the `skip' verb) once    every fifteen minutes.
  635.  
  636.       It is    possible to set    a polling interval in your
  637.       ~/._f_e_t_c_h_m_a_i_l_r_c file by saying    `set daemon <interval>', where
  638.       <interval> is    an integer number of seconds.  If you do this,
  639.       fetchmail will always    start in daemon    mode unless you
  640.       override it with the command-line option --daemon 0 or -d0.
  641.  
  642.       Only one daemon process is permitted per user; in daemon
  643.       mode,    _f_e_t_c_h_m_a_i_l makes    a per-user lockfile to guarantee this.
  644.       The option --------qqqquuuuiiiitttt will kill a    running    daemon process.
  645.       Otherwise, calling fetchmail with a daemon in    the background
  646.       sends    a wakeup signal    to the daemon, forcing it to poll
  647.       mailservers immediately.  (The wakeup    signal is SIGHUP if
  648.       fetchmail is running as root,    SIGUSR1    otherwise.)
  649.  
  650.       The ----tttt or --------ttttiiiimmmmeeeeoooouuuutttt option (keyword: timeout)allows you to
  651.       set a    server-nonresponse timeout in seconds.    If a
  652.       mailserver does not send a greeting message or respond to
  653.       commands for the given number    of seconds, _f_e_t_c_h_m_a_i_l will
  654.  
  655.  
  656.  
  657.      Page 10                          (printed 6/9/98)
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  665.  
  666.  
  667.  
  668.       hang up on it.  Without such a timeout _f_e_t_c_h_m_a_i_l might hang
  669.       up indefinitely trying to fetch mail from a down host.  This
  670.       would    be particularly    annoying for a _f_e_t_c_h_m_a_i_l running in
  671.       background.
  672.  
  673.       The ----LLLL or --------llllooooggggffffiiiilllleeee option (keyword: set logfile) allows you
  674.       to redirect status messages emitted while detached into a
  675.       specified logfile (follow the    option with the    logfile    name).
  676.       The logfile is opened    for append, so previous    messages
  677.       aren't deleted.  This    is primarily useful for    debugging
  678.       configurations.
  679.  
  680.       The --------ssssyyyysssslllloooogggg option (keyword:    syslog)    allows you to redirect
  681.       status and error messages emitted to the _s_y_s_l_o_g(3) system
  682.       daemon if available.    Messages are logged with an id of
  683.       ffffeeeettttcccchhhhmmmmaaaaiiiillll, the facility LLLLOOOOGGGG____MMMMAAAAIIIILLLL, and    priorities LLLLOOOOGGGG____EEEERRRRRRRR,
  684.       LLLLOOOOGGGG____AAAALLLLEEEERRRRTTTT or LLLLOOOOGGGG____IIIINNNNFFFFOOOO.  This option is intended for logging
  685.       status and error messages which indicate the status of the
  686.       daemon and the results while fetching    mail from the
  687.       server(s).  Error messages for command line options and
  688.       parsing the ._f_e_t_c_h_m_a_i_l_r_c file    are still written to stderr,
  689.       or the specified log file if the ----LLLL or --------llllooooggggffffiiiilllleeee option was
  690.       used.
  691.  
  692.       The --------iiiinnnnvvvviiiissssiiiibbbblllleeee option tries to make fetchmail invisible.
  693.       Normally, fetchmail behaves like any other MTA would -- it
  694.       generates a Received header into each    message    describing its
  695.       place    in the chain of    transmission, and tells    the MTA    it
  696.       forwards to that the mail came from the machine fetchmail
  697.       itself is running on.     If the    invisible option is on,    the
  698.       Received header is suppressed    and fetchmail tries to spoof
  699.       the MTA it forwards to into thinking it came directly    from
  700.       the mailserver host.
  701.  
  702.       The ----NNNN or --nodetach option suppresses backgrounding and
  703.       detachment of    the daemon process from    its control terminal.
  704.       This is primarily useful for debugging.  Note    that this also
  705.       causes the logfile option to be ignored (though perhaps it
  706.       shouldn't).
  707.  
  708.       Note that while running in daemon mode polling a POP2    or
  709.       POP3 server, transient errors    (such as DNS failures or
  710.       sendmail delivery refusals) may force    the fetchall option on
  711.       for the duration of the next polling cycle.  This is a
  712.       robustness feature.  It means    that if    a message is fetched
  713.       (and thus marked seen    by the mailserver) but not delivered
  714.       locally due to some transient    error, it will be re-fetched
  715.       during the next poll cycle.  (The IMAP logic doesn't delete
  716.       messages until they're delivered, so this problem does not
  717.       arise.)
  718.  
  719.  
  720.  
  721.  
  722.  
  723.      Page 11                          (printed 6/9/98)
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  731.  
  732.  
  733.  
  734.      RRRREEEETTTTRRRRIIIIEEEEVVVVAAAALLLL FFFFAAAAIIIILLLLUUUURRRREEEE MMMMOOOODDDDEEEESSSS
  735.       The protocols    _f_e_t_c_h_m_a_i_l uses to talk to mailservers are next
  736.       to bulletproof.  In normal operation forwarding to port 25,
  737.       no message is    ever deleted (or even marked for deletion) on
  738.       the host until the SMTP listener on the client has
  739.       acknowledged to _f_e_t_c_h_m_a_i_l that the message has been accepted
  740.       for delivery.     When forwarding to an MDA, however, there is
  741.       more possibility of error (because there's no    way for
  742.       fetchmail to get a reliable positive acknowledgement from
  743.       the MDA).
  744.  
  745.       The normal mode of _f_e_t_c_h_m_a_i_l is to try to download only
  746.       `new'    messages, leaving untouched (and undeleted) messages
  747.       you have already read    directly on the    server (or fetched
  748.       with a previous _f_e_t_c_h_m_a_i_l --_k_e_e_p).  But you may find that
  749.       messages you've already read on the server are being fetched
  750.       (and deleted)    even when you don't specify --all.  There are
  751.       several reasons this can happen.
  752.  
  753.       One could be that you're using POP2.    The POP2 protocol
  754.       includes no representation of    `new' or `old' state in
  755.       messages, so _f_e_t_c_h_m_a_i_l must treat all    messages as new    all
  756.       the time.  But POP2 is obsolete, so this is unlikely.
  757.  
  758.       Under    POP3, blame RFC1725.  That version of the POP3
  759.       protocol specification removed the LAST command, and some
  760.       POP servers follow it    (you can verify    this by    invoking
  761.       _f_e_t_c_h_m_a_i_l -_v to the mailserver and watching the response to
  762.       LAST early in    the query).  The _f_e_t_c_h_m_a_i_l code    tries to
  763.       compensate by    using POP3's UID feature, storing the
  764.       identifiers of messages seen in each session until the next
  765.       session, in the ._f_e_t_c_h_i_d_s file.  But this doesn't track
  766.       messages seen    with other clients, or read directly with a
  767.       mailer on the    host but not deleted afterward.     A better
  768.       solution would be to switch to IMAP.
  769.  
  770.       Another potential POP3 problem might be servers that insert
  771.       messages in the middle of mailboxes (some VMS
  772.       implementations of mail are rumored to do this).  The
  773.       _f_e_t_c_h_m_a_i_l code assumes that new messages are appended    to the
  774.       end of the mailbox; when this    is not true it may treat some
  775.       old messages as new and vice versa.  The only    real fix for
  776.       this problem is to  switch to    IMAP.
  777.  
  778.       The IMAP code    uses the presence or absence of    the server
  779.       flag \Seen to    decide whether or not a    message    is new.     Under
  780.       Unix,    it counts on your IMAP server to notice    the BSD-style
  781.       Status flags set by mail user    agents and set the \Seen flag
  782.       from them when appropriate.  All Unix    IMAP servers we    know
  783.       of do    this, though it's not specified    by the IMAP RFCs.  If
  784.       you ever trip    over a server that doesn't, the    symptom    will
  785.       be that messages you have already read on your host will
  786.  
  787.  
  788.  
  789.      Page 12                          (printed 6/9/98)
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  797.  
  798.  
  799.  
  800.       look new to the server.  In this (unlikely) case, only
  801.       messages you fetched with _f_e_t_c_h_m_a_i_l --_k_e_e_p will be both
  802.       undeleted and    marked old.
  803.  
  804.       In ETRN mode,    _f_e_t_c_h_m_a_i_l does not actually retrieve messages;
  805.       instead, it asks the server's    SMTP listener to start a queue
  806.       flush    to the client via SMTP.     Therefore it sends only
  807.       undelivered messages.
  808.  
  809.  
  810.      SSSSPPPPAAAAMMMM FFFFIIIILLLLTTTTEEEERRRRIIIINNNNGGGG
  811.       Many SMTP listeners allow administrators to set up `spam
  812.       filters' that    block unsolicited email    from specified
  813.       domains.  A MAIL FROM    line that triggers this    feature    will
  814.       elicit an SMTP response which    (unfortunately)    varies
  815.       according to the listener.
  816.  
  817.       Newer    versions of _s_e_n_d_m_a_i_l return an error code of 571.
  818.       This return value is blessed by RFC1893 as "Delivery not
  819.       authorized, message refused".
  820.  
  821.       According to current drafts of the replacement for RFC821,
  822.       the correct thing to return in this situation    is 550
  823.       "Requested action not    taken:    mailbox    unavailable" (the
  824.       draft    adds "[E.g., mailbox not found,    no access, or command
  825.       rejected for policy reasons].").
  826.  
  827.       The _e_x_i_m MTA returns 501 "Syntax error in parameters or
  828.       arguments" , but will    move to    550 soon.
  829.  
  830.       The _f_e_t_c_h_m_a_i_l    code recognizes    any of these error codes and
  831.       discards the message.     This is the _o_n_l_y circumstance under
  832.       which    fetchmail ever discards    mail.
  833.  
  834.       If _f_e_t_c_h_m_a_i_l is fetching from    an IMAP    server,    the antispam
  835.       response will    be detected and    the message rejected
  836.       immediately after the    headers    have been fetched, without
  837.       reading the message body.  Thus, you won't pay for
  838.       downloading spam message bodies.
  839.  
  840.  
  841.      TTTTHHHHEEEE RRRRUUUUNNNN CCCCOOOONNNNTTTTRRRROOOOLLLL FFFFIIIILLLLEEEE
  842.       The preferred    way to set up fetchmail    is to write a
  843.       ._f_e_t_c_h_m_a_i_l_r_c file in your home directory.  When there    is a
  844.       conflict between the command-line arguments and the
  845.       arguments in this file, the command-line arguments take
  846.       precedence.
  847.  
  848.       To protect the security of your passwords, when --version is
  849.       not on your ~/._f_e_t_c_h_m_a_i_l_r_c may not have more than 0600
  850.       (u=rw,g=,o=) permissions; _f_e_t_c_h_m_a_i_l will complain and    exit
  851.       otherwise.
  852.  
  853.  
  854.  
  855.      Page 13                          (printed 6/9/98)
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  863.  
  864.  
  865.  
  866.       You may read the ._f_e_t_c_h_m_a_i_l_r_c    file as    a list of commands to
  867.       be executed when _f_e_t_c_h_m_a_i_l is    called with no arguments.
  868.  
  869.     RRRRuuuunnnn CCCCoooonnnnttttrrrroooollll SSSSyyyynnnnttttaaaaxxxx
  870.       Comments begin with a    '#' and    extend through the end of the
  871.       line.     Otherwise the file consists of    a series of server
  872.       entries or global option statements in a free-format,
  873.       token-oriented syntax.
  874.  
  875.       There    are four kinds of tokens: grammar keywords, numbers
  876.       (i.e.    decimal    digit sequences), unquoted strings, and    quoted
  877.       strings.  A quoted string is bounded by double quotes    and
  878.       may contain whitespace (and quoted digits are    treated    as a
  879.       string).  An unquoted    string is any whitespace-delimited
  880.       token    that is    neither    numeric, string    quoted nor contains
  881.       the special characters `,', `;', `:',    or `='.
  882.  
  883.       Any amount of    whitespace separates tokens in server entries,
  884.       but is otherwise ignored. You    may use    standard C-style
  885.       escapes (\n, \t, \b, octal, and hex) to embed    non-printable
  886.       characters or    string delimiters in strings.
  887.  
  888.       Each server entry consists of    one of the keywords `poll' or
  889.       `skip', followed by a    server name, followed by server
  890.       options, followed by any number of user descriptions.     Note:
  891.       the most common cause    of syntax errors is mixing up user and
  892.       server options.
  893.  
  894.       For backward compatibility, the word `server'    is a synonym
  895.       for `poll'.
  896.  
  897.       You can use the noise    keywords `and',    `with',    `has',
  898.       `wants', and `options' anywhere in an    entry to make it
  899.       resemble English.  They're ignored, but but can make entries
  900.       much easier to read at a glance.  The    punctuation characters
  901.       ':', ';' and ',' are also ignored.
  902.  
  903.     PPPPoooollllllll vvvvssss.... SSSSkkkkiiiipppp
  904.       The `poll' verb tells    fetchmail to query this    host when it
  905.       is run with no arguments.  The `skip'    verb tells _f_e_t_c_h_m_a_i_l
  906.       not to poll this host    unless it is explicitly    named on the
  907.       command line.     (The `skip' verb allows you to    experiment
  908.       with test entries safely, or easily disable entries for
  909.       hosts    that are temporarily down.)
  910.  
  911.     KKKKeeeeyyyywwwwoooorrrrdddd////OOOOppppttttiiiioooonnnn SSSSuuuummmmmmmmaaaarrrryyyy
  912.       Here are the legal server options.  Keyword suffixes
  913.       enclosed in square brackets are optional.  Those
  914.       corresponding    to command-line    options    are followed by    `-'
  915.       and the appropriate option letter.
  916.  
  917.       Keyword       Opt     Function
  918.  
  919.  
  920.  
  921.      Page 14                          (printed 6/9/98)
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  929.  
  930.  
  931.  
  932.       _________________________________________________________
  933.       via             Specify DNS name of mailserver,
  934.                  overriding poll name
  935.       proto[col]       -p     Specify protocol (case
  936.                  insensitive):    POP2, POP3, IMAP,
  937.                  IMAP-K4, APOP,    KPOP
  938.       port           -P     Specify TCP/IP    service    port
  939.       auth[enticate]   -A     Set preauthentication type
  940.                  (default `password')
  941.       timeout       -t     Server    inactivity timout in
  942.                  seconds (default 300)
  943.       envelope       -E     Specify envelope-address header
  944.                  name
  945.       no envelope         Disable looking for envelope
  946.                  address
  947.       qvirtual       -Q     Qmail virtual domain prefix to
  948.                  remove    from user name
  949.       aka             Specify alternate DNS names of
  950.                  mailserver
  951.       interface       -I     specify IP interface(s) that must
  952.                  be up for server poll to take
  953.                  place
  954.       monitor       -M     Specify IP address to monitor for
  955.                  activity
  956.       dns             Enable    DNS lookup for multidrop
  957.                  (default)
  958.       no dns         Disable DNS lookup for    multidrop
  959.       uidl           -U     Force POP3 to use client-side
  960.                  UIDLs
  961.       no uidl         Turn off POP3 use of client-side
  962.                  UIDLs (default)
  963.  
  964.       Here are the legal user options:
  965.  
  966.       K_e_y_w_o_r_d__________O_p_t____F_u_n_c_t_i_o_n___________________________
  967.       user[name]      -u    Set remote user    name (local user
  968.                 name if    name followed by `here')
  969.       is            Connect    local and remote user
  970.                 names
  971.       to            Connect    local and remote user
  972.                 names
  973.       pass[word]        Specify    remote account password
  974.       folder      -r    Specify    remote folder to query
  975.       smtphost      -S    Specify    smtp host(s) to    forward    to
  976.       mda          -m    Specify    MDA for    local delivery
  977.       preconnect        Command    to be executed before each
  978.                 connection
  979.       postconnect        Command    to be executed after each
  980.                 connection
  981.       keep          -k    Don't delete seen messages from
  982.  
  983.  
  984.  
  985.  
  986.  
  987.      Page 15                          (printed 6/9/98)
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  995.  
  996.  
  997.  
  998.                 server
  999.      flush         -F       Flush all seen messages before
  1000.                querying
  1001.      fetchall         -a       Fetch all messages whether seen or
  1002.                not
  1003.      rewrite           Rewrite destination addresses for
  1004.                reply (default)
  1005.      stripcr           Strip carriage returns from ends
  1006.                of lines
  1007.      forcecr           Force carriage returns at ends of
  1008.                lines
  1009.      pass8bits           Force BODY=8BITMIME to ESMTP
  1010.                listener
  1011.      dropstatus           Strip Status    lines out of incoming
  1012.                mail
  1013.      no    keep         -K       Delete seen messages    from server
  1014.                (default)
  1015.      no    flush           Don't flush all seen    messages
  1016.                before querying (default)
  1017.      no    fetchall       Retrieve only new messages
  1018.                (default)
  1019.      no    rewrite           Don't rewrite headers
  1020.      no    stripcr           Don't strip carriage    returns
  1021.                (default)
  1022.      no    forcecr           Don't force carriage    returns    at
  1023.                EOL (default)
  1024.      no    pass8bits       Don't force BODY=8BITMIME to    ESMTP
  1025.                listener (default)
  1026.      no    dropstatus       Don't drop Status headers
  1027.                (default)
  1028.      limit         -l       Set message size limit
  1029.      batchlimit         -b       Max # messages to fetch in single
  1030.                connect
  1031.      fetchlimit         -B       Max # messages to forward in
  1032.                single connect
  1033.      expunge         -e       Perform an expunge on every #th
  1034.                message (IMAP only)
  1035.      syslog           Do error logging through
  1036.                syslog(3).
  1037.  
  1038.       Remember that    all user options must _f_o_l_l_o_w all server
  1039.       options.
  1040.  
  1041.       In the .fetchmailrc file, the    `envelope' string argument may
  1042.       be preceded by a whitespace-separated    number.     This number,
  1043.       if specified,    is the number of such headers to skip (that
  1044.       is, an argument of 1 selects the second header of the    given
  1045.       type).  This is sometime useful for ignoring bogus Received
  1046.       headers created by an    ISP's local delivery agent.
  1047.  
  1048.     KKKKeeeeyyyywwwwoooorrrrddddssss NNNNooootttt CCCCoooorrrrrrrreeeessssppppoooonnnnddddiiiinnnngggg TTTToooo OOOOppppttttiiiioooonnnn SSSSwwwwiiiittttcccchhhheeeessss
  1049.       The `folder' and `smtphost' options (unlike their command-
  1050.  
  1051.  
  1052.  
  1053.      Page 16                          (printed 6/9/98)
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  1061.  
  1062.  
  1063.  
  1064.       line equivalents) can    take a space- or comma-separated list
  1065.       of names following them.
  1066.  
  1067.       All options correspond to the    obvious    command-line
  1068.       arguments, except the    following: `via', `interval', `aka',
  1069.       `is',    `to', `dns'/`no    dns', `password', `preconnect',
  1070.       `postconnect', `localdomains', `stripcr'/`no stripcr',
  1071.       `forcecr'/`no    forcecr', `pass8bits'/`no pass8bits'
  1072.       `dropstatus/no dropstatus', and `no envelope'.
  1073.  
  1074.       The `via' option is for use with ssh,    or if you want to have
  1075.       more than one    configuration pointing at the same site.  If
  1076.       it is    present, the string argument will be taken as the
  1077.       actual DNS name of the mailserver host to query.  This will
  1078.       override the argument    of poll, which can then    simply be a
  1079.       distinct label for the configuration (e.g. what you would
  1080.       give on the command line to explicitly query this host).  If
  1081.       the `via' name is `localhost', the poll name will also still
  1082.       be used as a possible    match in multidrop mode; otherwise the
  1083.       `via'    name will be used instead and the poll name will be
  1084.       purely a label.
  1085.  
  1086.       The `interval' option    (which takes a numeric argument)
  1087.       allows you to    poll a server less frequently than the basic
  1088.       poll interval.  If you say `interval N' the server this
  1089.       option is attached to    will only be queried every N poll
  1090.       intervals.
  1091.  
  1092.       The `is' or `to' keywords associate the following local
  1093.       (client) name(s) (or server-name to client-name mappings
  1094.       separated by =) with the mailserver user name    in the entry.
  1095.       If an    is/to list has `*' as its last name, unrecognized
  1096.       names    are simply passed through.
  1097.  
  1098.       A single local name can be used to support redirecting your
  1099.       mail when your username on the client    machine    is different
  1100.       from your name on the    mailserver.  When there    is only    a
  1101.       single local name, mail is forwarded to that local username
  1102.       regardless of    the message's Received,    To, Cc,    and Bcc
  1103.       headers.  In this case _f_e_t_c_h_m_a_i_l never does DNS lookups.
  1104.  
  1105.       When there is    more than one local name (or name mapping) the
  1106.       _f_e_t_c_h_m_a_i_l code does look at the Received, To,    Cc, and    Bcc
  1107.       headers of retrieved mail (this is `multidrop    mode').     It
  1108.       looks    for addresses with hostname parts that match your poll
  1109.       name or your `via', `aka' or `localdomains' options, and
  1110.       usually also for hostname parts which    DNS tells it are
  1111.       aliases of the mailserver.  See the discussion of `dns',
  1112.       `localdomains', and `aka' for    details    on how matching
  1113.       addresses are    handled.  If _f_e_t_c_h_m_a_i_l cannot match any
  1114.       mailserver usernames or localdomain addresses, the default
  1115.       recipient is the calling user.
  1116.  
  1117.  
  1118.  
  1119.      Page 17                          (printed 6/9/98)
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  1127.  
  1128.  
  1129.  
  1130.       The `dns' option (normally on) controls the way addresses
  1131.       from multidrop mailboxes are checked.     On, it    enables    logic
  1132.       to check each    host address that doesn't match    an `aka' or
  1133.       `localdomains' declaration by    looking    it up with DNS.     When
  1134.       a mailserver username    is recognized attached to a matching
  1135.       hostname part, its local mapping is added to the list    of
  1136.       local    recipients.
  1137.  
  1138.       The `aka' option is for use with multidrop mailboxes.     It
  1139.       allows you to    pre-declare a list of DNS aliases for a
  1140.       server.  This    is an optimization hack    that allows you    to
  1141.       trade    space for speed.  When _f_e_t_c_h_m_a_i_l, while    processing a
  1142.       multidrop mailbox, grovels through message headers looking
  1143.       for names of the mailserver, pre-declaring common ones can
  1144.       save it from having to do DNS    lookups.
  1145.  
  1146.       The `localdomains' option allows you to declare a list of
  1147.       domains which    fetchmail should consider local.  When
  1148.       fetchmail is parsing address lines in    multidrop modes, and a
  1149.       trailing segment of a    host name matches a declared local
  1150.       domain, that address is passed through to the    listener or
  1151.       MDA unaltered    (local-name mappings are _n_o_t applied).
  1152.  
  1153.       If you are using `localdomains', you may also    need to
  1154.       specify `no envelope', which disables    _f_e_t_c_h_m_a_i_l's normal
  1155.       attempt to deduce an envelope    address    from the Received line
  1156.       or X-Envelope-To header or whatever header has been
  1157.       previously set by `envelope'.     If you    set `no    envelope' in
  1158.       the defaults entry it    is possible to undo that in individual
  1159.       entries by using `envelope <string>'.     As a special case,
  1160.       `envelope "Received"'    restores the default parsing of
  1161.       Received lines.
  1162.  
  1163.       The ppppaaaasssssssswwwwoooorrrrdddd option requires a string    argument, which    is the
  1164.       password to be used with the entry's server.
  1165.  
  1166.       The `preconnect' keyword allows you to specify a shell
  1167.       command to be    executed just before each time _f_e_t_c_h_m_a_i_l
  1168.       establishes a    mailserver connection.    This may be useful if
  1169.       you are attempting to    set up secure POP connections with the
  1170.       aid of _s_s_h(1).  If the command returns a nonzero status, the
  1171.       poll of that mailserver will be aborted.
  1172.  
  1173.       Similarly, the `postconnect' keyword similarly allows    you to
  1174.       specify a shell command to be    executed just after each time
  1175.       a mailserver connection is taken down.
  1176.  
  1177.       The `forcecr'    option controls    whether    lines terminated by LF
  1178.       only are given CRLF termination before forwarding.  Strictly
  1179.       speaking RFC821 requires this, but few MTAs enforce the
  1180.       requirement it so this option    is normally off    (only one such
  1181.       MTA, qmail, is in significant    use at time of writing).
  1182.  
  1183.  
  1184.  
  1185.      Page 18                          (printed 6/9/98)
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  1193.  
  1194.  
  1195.  
  1196.       The `stripcr'    option controls    whether    carriage returns are
  1197.       stripped out of retrieved mail before    it is forwarded.  It
  1198.       is normally not necessary to set this, because it defaults
  1199.       to `on' (CR stripping    enabled) when there is an MDA declared
  1200.       but `off' (CR    stripping disabled) when forwarding is via
  1201.       SMTP.     If `stripcr' and `forcecr' are    both on, `stripcr'
  1202.       will override.
  1203.  
  1204.       The `pass8bits' option exists    to cope    with Microsoft mail
  1205.       programs that    stupidly slap a    "Content-Transfer-Encoding:
  1206.       7bit"    on everything.    With this option off (the default) and
  1207.       such a header    present, _f_e_t_c_h_m_a_i_l declares BODY=7BIT to an
  1208.       ESMTP-capable    listener; this causes problems for messages
  1209.       actually using 8-bit ISO or KOI-8 character sets, which will
  1210.       be garbled by    having the high    bits of    all characters
  1211.       stripped.  If    `pass8bits' is on, _f_e_t_c_h_m_a_i_l is    forced to
  1212.       declare BODY=8BITMIME    to any ESMTP-capable listener.    If the
  1213.       listener is 8-bit-clean (as all the major ones now are) the
  1214.       right    thing will probably result.
  1215.  
  1216.       The `dropstatus' option controls whether nonempty Status
  1217.       lines    are retained in    fetched    mail (the default) or
  1218.       discarded.  Retaining    them allows your MUA to    see what
  1219.       messages (if any) were marked    seen on    the client.  On    the
  1220.       other    hand, it can confuse some new-mail notifiers, which
  1221.       assume that anything with a Status line in it    has been seen.
  1222.       (Note: the empty Status lines    inserted by some buggy POP
  1223.       servers are unconditionally discarded.)
  1224.  
  1225.     MMMMiiiisssscccceeeellllllllaaaannnneeeeoooouuuussss RRRRuuuunnnn CCCCoooonnnnttttrrrroooollll OOOOppppttttiiiioooonnnnssss
  1226.       The words `here' and `there' have useful English-like
  1227.       significance.     Normally `user    eric is    esr' would mean    that
  1228.       mail for the remote user `eric' is to    be delivered to    `esr',
  1229.       but you can make this    clearer    by saying `user    eric there is
  1230.       esr here', or    reverse    it by saying `user esr here is eric
  1231.       there'
  1232.  
  1233.       Legal    protocol identifiers for use with the `protocol'
  1234.       keyword are:
  1235.  
  1236.           auto (or AUTO)
  1237.           pop2 (or POP2)
  1238.           pop3 (or POP3)
  1239.           imap (or IMAP)
  1240.           imap-k4 (or IMAP-K4)
  1241.           apop (or APOP)
  1242.           kpop (or KPOP)
  1243.  
  1244.  
  1245.       Legal    authentication types are `password' or `kerberos'.
  1246.       The former specifies authentication by normal    transmission
  1247.       of a password    (the password may be plaintext or subject to
  1248.  
  1249.  
  1250.  
  1251.      Page 19                          (printed 6/9/98)
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  1259.  
  1260.  
  1261.  
  1262.       protocol-specific encryption as in APOP); the    second tells
  1263.       _f_e_t_c_h_m_a_i_l to try to get a Kerberos ticket at the start of
  1264.       each query instead, and send an arbitrary string as the
  1265.       password.
  1266.  
  1267.       Specifying `kpop' sets POP3 protocol over port 1109 with
  1268.       Kerberos V4 preauthentication.  These    defaults may be
  1269.       overridden by    later options.
  1270.  
  1271.       There    are currently three global option statements; `set
  1272.       logfile' followed by a string    sets the same global specified
  1273.       by --logfile.     A command-line    --logfile option will override
  1274.       this.     Also, `set daemon' sets the poll interval as --daemon
  1275.       does.     This can be overridden    by a command-line --daemon
  1276.       option; in particular    --daemon 0 can be used to force
  1277.       foreground operation.    Finally, `set syslog' sends log
  1278.       messages to syslogd(8).
  1279.  
  1280.  
  1281.      CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRAAAATTTTIIIIOOOONNNN EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  1282.       Basic    format is:
  1283.  
  1284.         poll SERVERNAME protocol PROTOCOL username NAME password PASSWORD
  1285.  
  1286.       Example:
  1287.  
  1288.         poll pop.provider.net protocol pop3    username jsmith    password secret1
  1289.  
  1290.       Or, using some abbreviations:
  1291.  
  1292.         poll pop.provider.net proto    pop3 user jsmith password secret1
  1293.  
  1294.       Multiple servers may be listed:
  1295.  
  1296.         poll pop.provider.net proto    pop3 user jsmith pass secret1
  1297.         poll other.provider.net proto pop2 user John.Smith pass My^Hat
  1298.  
  1299.       Here's a version of those two    with more whitespace and some
  1300.       noise    words:
  1301.  
  1302.         poll pop.provider.net proto    pop3
  1303.         user jsmith, with password secret1, is jsmith here;
  1304.         poll other.provider.net proto pop2:
  1305.         user John.Smith, with password My^Hat, is John.Smith here;
  1306.  
  1307.       This version is much easier to read and doesn't cost
  1308.       significantly    more (parsing is done only once, at startup
  1309.       time).
  1310.  
  1311.  
  1312.       If you need to include whitespace in a parameter string,
  1313.       enclose the string in    double quotes.    Thus:
  1314.  
  1315.  
  1316.  
  1317.      Page 20                          (printed 6/9/98)
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  1325.  
  1326.  
  1327.  
  1328.         poll mail.provider.net with    proto pop3:
  1329.           user jsmith there has    password "u can't krak this"
  1330.                   is jws here and wants mda    "/bin/mail"
  1331.  
  1332.       You may have an initial server description headed by the
  1333.       keyword `defaults' instead of    `poll' followed    by a name.
  1334.       Such a record    is interpreted as defaults for all queries to
  1335.       use. It may be overwritten by    individual server
  1336.       descriptions.     So, you could write:
  1337.  
  1338.         defaults proto pop3
  1339.           user jsmith
  1340.         poll pop.provider.net
  1341.           pass secret1
  1342.         poll mail.provider.net
  1343.           user jjsmith there has password secret2
  1344.  
  1345.       It's possible    to specify more    than one user per server (this
  1346.       is only likely to be useful when running fetchmail in    daemon
  1347.       mode as root).  The `user' keyword leads off a user
  1348.       description, and every user specification in a multi-user
  1349.       entry    must include it.  Here's an example:
  1350.  
  1351.         poll pop.provider.net proto    pop3 port 3111
  1352.           user jsmith with pass    secret1    is smith here
  1353.           user jones with pass secret2 is jjones here
  1354.  
  1355.       This associates the local username `smith' with the
  1356.       pop.provider.net username `jsmith' and the local username
  1357.       `jjones' with    the pop.provider.net username `jones'.
  1358.  
  1359.       Here's what a    simple retrieval configuration for a multi-
  1360.       drop mailbox looks like:
  1361.  
  1362.         poll pop.provider.net:
  1363.           user maildrop    with pass secret1 to golux hurkle=happy    snark here
  1364.  
  1365.       This says that the mailbox of    account    `maildrop' on the
  1366.       server is a multi-drop box, and that messages    in it should
  1367.       be parsed for    the server user    names `golux', `hurkle', and
  1368.       `snark'.  It further specifies that `golux' and `snark' have
  1369.       the same name    on the client as on the    server,    but mail for
  1370.       server user `hurkle' should be delivered to client user
  1371.       `happy'.
  1372.  
  1373.       Here's an example of another kind of multidrop connection:
  1374.  
  1375.         poll pop.provider.net localdomains loonytoons.org:
  1376.           user maildrop    with pass secret1 to esr * here
  1377.  
  1378.       This also says that the mailbox of account `maildrop'    on the
  1379.       server is a multi-drop box.  It tells    fetchmail that any
  1380.  
  1381.  
  1382.  
  1383.      Page 21                          (printed 6/9/98)
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  1391.  
  1392.  
  1393.  
  1394.       address in the loonytoons.org    domain (including subdomain
  1395.       addresses like `joe@daffy.loonytoons.org') should be passed
  1396.       through to the local SMTP listener without modification.  Be
  1397.       careful of mail loops    if you do this!
  1398.  
  1399.       Here's an example configuration using    ssh.  The queries go
  1400.       through an ssh connecting local port 1234 to port 110    on
  1401.       mailhost.net;    the preconnect command sets up the ssh.
  1402.  
  1403.       poll mailhost.net via    localhost port 1234 with pop3:
  1404.           preconnect "ssh -f -L    1234:mailhost.net:110
  1405.                  mailhost.net sleep    20 </dev/null >/dev/null";
  1406.  
  1407.  
  1408.      TTTTHHHHEEEE UUUUSSSSEEEE AAAANNNNDDDD AAAABBBBUUUUSSSSEEEE OOOOFFFF MMMMUUUULLLLTTTTIIIIDDDDRRRROOOOPPPP
  1409.       Use the multiple-local-recipients feature with caution -- it
  1410.       can bite.  Also note that all    multidrop features are
  1411.       ineffective in ETRN mode.
  1412.  
  1413.  
  1414.     HHHHeeeeaaaaddddeeeerrrr vvvvssss.... EEEEnnnnvvvveeeellllooooppppeeee aaaaddddddddrrrreeeesssssssseeeessss
  1415.       The fundamental problem is that by having your mailserver
  1416.       toss several peoples'    mail in    a single maildrop box, you may
  1417.       have thrown away potentially vital information about who
  1418.       each piece of    mail was actually addressed to (the `envelope
  1419.       address', as opposed to the header addresses in the RFC822
  1420.       To/Cc/Bcc headers).  This `envelope address' is the address
  1421.       you need in order to reroute mail properly.
  1422.  
  1423.       Sometimes _f_e_t_c_h_m_a_i_l can deduce the envelope address.    If the
  1424.       mailserver MTA is _s_e_n_d_m_a_i_l and the item of mail had just one
  1425.       recipient, the MTA will have written a `by/for' clause that
  1426.       gives    the envelope addressee into its    Received header. But
  1427.       this doesn't work reliably for other MTAs, nor if there is
  1428.       more than one    recipient.  By default,    _f_e_t_c_h_m_a_i_l looks    for
  1429.       envelope addresses in    these lines; you can restore this
  1430.       default with -E "Received" or    `envelope Received'.
  1431.  
  1432.       Alternatively, some SMTP listeners and/or mail servers
  1433.       insert a header in each message containing a copy of the
  1434.       envelope addresses.  This header (when it exists) is often
  1435.       `X-Envelope-To'.  Fetchmail's    assumption about this can be
  1436.       changed with the -E or `envelope' option.  Note that writing
  1437.       an envelope header of    this kind exposes the names of
  1438.       recipients (including    blind-copy recopients) to all
  1439.       receivers of the messages; it    is therefore regarded by some
  1440.       administrators as a security/privacy problem.
  1441.  
  1442.       A slight variation of    the `X-Envelope-To' header is the
  1443.       `Delivered-To' put by    qmail to avoid mail loops. It will
  1444.       probably prefix the user name    with a string that normally
  1445.       matches the user's domain. To    remove this prefix you can use
  1446.  
  1447.  
  1448.  
  1449.      Page 22                          (printed 6/9/98)
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  1457.  
  1458.  
  1459.  
  1460.       the -Q or `qvirtual' option.
  1461.  
  1462.       Sometimes, unfortunately, neither of these methods works.
  1463.       When they all    fail, fetchmail    must fall back on the contents
  1464.       of To/Cc/Bcc headers to try to determine recipient
  1465.       addressees --    and these are not reliable.  In    particular,
  1466.       mailing-list software    often ships mail with only the list
  1467.       broadcast address in the To header.
  1468.  
  1469.       When _f_e_t_c_h_m_a_i_l cannot    deduce a recipient address that    is
  1470.       local, and the intended recipient address was    anyone other
  1471.       than fetchmail's invoking user, mail will get    lost.  This is
  1472.       what makes the multidrop feature risky.
  1473.  
  1474.       A related problem is that when you blind-copy    a mail
  1475.       message, the Bcc information is carried _o_n_l_y as envelope
  1476.       address (it's    not put    in the headers fetchmail can see
  1477.       unless there is an X-Envelope    header).  Thus,    blind-copying
  1478.       to someone who gets mail over    a fetchmail link will fail
  1479.       unless the the mailserver host routinely writes X-Envelope
  1480.       or an    equivalent header into messages    in your    maildrop.
  1481.  
  1482.  
  1483.     GGGGoooooooodddd WWWWaaaayyyyssss TTTToooo UUUUsssseeee MMMMuuuullllttttiiiiddddrrrroooopppp MMMMaaaaiiiillllbbbbooooxxxxeeeessss
  1484.       Multiple local names can be used to administer a mailing
  1485.       list from the    client side of a _f_e_t_c_h_m_a_i_l collection.
  1486.       Suppose your name is `esr', and you want to both pick    up
  1487.       your own mail    and maintain a mailing list called (say)
  1488.       "fetchmail-friends", and you want to keep the    alias list on
  1489.       your client machine.
  1490.  
  1491.       On your server, you can alias    `fetchmail-friends' to `esr';
  1492.       then,    in your    ._f_e_t_c_h_m_a_i_l_r_c, declare `to esr fetchmail-
  1493.       friends here'.  Then,    when mail including `fetchmail-
  1494.       friends' as a    local address gets fetched, the    list name will
  1495.       be appended to the list of recipients    your SMTP listener
  1496.       sees.     Therefore it will undergo alias expansion locally.
  1497.       Be sure to include `esr' in the local    alias expansion    of
  1498.       fetchmail-friends, or    you'll never see mail sent only    to the
  1499.       list.     Also be sure that your    listener has the "me-too"
  1500.       option set (sendmail's -oXm command-line option or OXm
  1501.       declaration) so your name isn't removed from alias
  1502.       expansions in    messages you send.
  1503.  
  1504.       This trick is    not without its    problems, however.  You'll
  1505.       begin    to see this when a message comes in that is addressed
  1506.       only to a mailing list you do    _n_o_t have declared as a local
  1507.       name.     Each such message will    feature    an `X-Fetchmail-
  1508.       Warning' header which    is generated because fetchmail cannot
  1509.       find a valid local name in the recipient addresses.  Such
  1510.       messages default (as was described above) to being sent to
  1511.       the local user running _f_e_t_c_h_m_a_i_l, but    the program has    no way
  1512.  
  1513.  
  1514.  
  1515.      Page 23                          (printed 6/9/98)
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  1523.  
  1524.  
  1525.  
  1526.       to know that that's actually the right thing.
  1527.  
  1528.  
  1529.     BBBBaaaadddd WWWWaaaayyyyssss TTTToooo AAAAbbbbuuuusssseeee MMMMuuuullllttttiiiiddddrrrroooopppp MMMMaaaaiiiillllbbbbooooxxxxeeeessss
  1530.       Multidrop mailboxes and _f_e_t_c_h_m_a_i_l serving multiple users in
  1531.       daemon mode do not mix.  The problem,    again, is mail from
  1532.       mailing lists, which typically does not have an individual
  1533.       recipient address on it.   Unless _f_e_t_c_h_m_a_i_l can deduce an
  1534.       envelope address, such mail will only    go to the account
  1535.       running fetchmail (probably root).  Also, blind-copied users
  1536.       are very likely never    to see their mail at all.
  1537.  
  1538.       If you're tempted to use _f_e_t_c_h_m_a_i_l to    retrieve mail for
  1539.       multiple users from a    single mail drop via POP or IMAP,
  1540.       think    again (and reread the section on header    and envelope
  1541.       addresses above).  It    would be smarter to just let the mail
  1542.       sit in the mailserver's queue    and use    fetchmail's ETRN mode
  1543.       to trigger SMTP sends    periodically (of course, this means
  1544.       you have to poll more    frequently than    the mailserver's
  1545.       expiry period).  If you can't    arrange    this, try setting up a
  1546.       UUCP feed.
  1547.  
  1548.       If you absolutely _m_u_s_t use multidrop for this    purpose, make
  1549.       sure your mailserver writes an envelope-address header that
  1550.       fetchmail can    see.  Otherwise    you _w_i_l_l lose mail and it _w_i_l_l
  1551.       come back to haunt you.
  1552.  
  1553.  
  1554.     SSSSppppeeeeeeeeddddiiiinnnngggg UUUUpppp MMMMuuuullllttttiiiiddddrrrroooopppp CCCChhhheeeecccckkkkiiiinnnngggg
  1555.       Normally, when multiple user are declared _f_e_t_c_h_m_a_i_l extracts
  1556.       recipient addresses as described above and checks each host
  1557.       part with DNS    to see if it's an alias    of the mailserver.  If
  1558.       so, the name mappings    described in the to ...    here
  1559.       declaration are done and the mail locally delivered.
  1560.  
  1561.       This is the safest but also slowest method.  To speed    it up,
  1562.       pre-declare mailserver aliases with `aka'; these are checked
  1563.       before DNS lookups are done.    If you're certain your aka
  1564.       list contains    aaaallllllll DNS    aliases    of the mailserver (and all MX
  1565.       names    pointing at it)    you can    declare    `no dns' to suppress
  1566.       DNS lookups entirely and _o_n_l_y    match against the aka list.
  1567.  
  1568.  
  1569.      EEEEXXXXIIIITTTT CCCCOOOODDDDEEEESSSS
  1570.       To facilitate    the use    of _f_e_t_c_h_m_a_i_l in    shell scripts, an exit
  1571.       code is returned to give an indication of what occurred
  1572.       during a given connection.
  1573.  
  1574.       The exit codes returned by _f_e_t_c_h_m_a_i_l are as follows:
  1575.  
  1576.       0    One or more messages were successfully retrieved.
  1577.  
  1578.  
  1579.  
  1580.  
  1581.      Page 24                          (printed 6/9/98)
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  1589.  
  1590.  
  1591.  
  1592.       1    There was no mail awaiting retrieval.  (There may have
  1593.            been old    mail still on the server but not selected for
  1594.            retrieval.)
  1595.  
  1596.       2    An error    was encountered    when attempting    to open    a
  1597.            socket for the POP connection.  If you don't know what
  1598.            a socket    is, don't worry    about it -- just treat this as
  1599.            an 'unrecoverable error'.
  1600.  
  1601.       3    The user    authentication step failed.  This usually
  1602.            means that a bad    user-id, password, or APOP id was
  1603.            specified.
  1604.  
  1605.       4    Some sort of fatal protocol error was detected.
  1606.  
  1607.       5    There was a syntax error    in the arguments to _f_e_t_c_h_m_a_i_l.
  1608.  
  1609.       6    The run control file had    bad permissions.
  1610.  
  1611.       7    There was an error condition reported by    the server.
  1612.            Can also    fire if    _f_e_t_c_h_m_a_i_l timed    out while waiting for
  1613.            the server.
  1614.  
  1615.       8    Client-side exclusion error.  This means    _f_e_t_c_h_m_a_i_l
  1616.            either found another copy of itself already running, or
  1617.            failed in such a    way that it isn't sure whether another
  1618.            copy is running.
  1619.  
  1620.       9    The user    authentication step failed because the server
  1621.            responded "lock busy".  Try again after a brief pause!
  1622.            This error is not implemented for all protocols,    nor
  1623.            for all servers.     If not    implemented for    your server,
  1624.            "3" will    be returned instead, see above.     May be
  1625.            returned    when talking to    qpopper    or other servers that
  1626.            can respond with    "lock busy" or some similar text
  1627.            containing the word "lock".
  1628.  
  1629.       10   The _f_e_t_c_h_m_a_i_l. run failed while trying to do an SMTP
  1630.            port open or transaction.
  1631.  
  1632.       11   Fatal DNS error.     Fetchmail encountered an error    while
  1633.            performing a DNS    lookup at startup and could not
  1634.            proceed.
  1635.  
  1636.       11   Internal    error.    You should see a message on standard
  1637.            error with details.
  1638.  
  1639.       When _f_e_t_c_h_m_a_i_l queries more than one host, return status is
  1640.       0 if _a_n_y query successfully retrieved    mail. Otherwise    the
  1641.       returned error status    is that    of the last host queried.
  1642.  
  1643.  
  1644.  
  1645.  
  1646.  
  1647.      Page 25                          (printed 6/9/98)
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  1655.  
  1656.  
  1657.  
  1658.      AAAAUUUUTTTTHHHHOOOORRRR
  1659.       Eric S. Raymond <esr@snark.thyrsus.com>. This    program    is
  1660.       descended from and replaces _p_o_p_c_l_i_e_n_t, by Carl Harris
  1661.       <ceharris@mal.com>; the internals are    quite different, but
  1662.       some of its interface    design is directly traceable to    that
  1663.       ancestral program.
  1664.  
  1665.  
  1666.      FFFFIIIILLLLEEEESSSS
  1667.       ~/.fetchmailrc
  1668.            default run control file
  1669.  
  1670.       ~/.fetchids
  1671.            default location    of file    associating hosts with last
  1672.            message IDs seen    (used only with    newer RFC1725-
  1673.            compliant POP3 servers supporting the UIDL command).
  1674.  
  1675.       ~/.netrc
  1676.            your FTP    run control file, which    (if present) will be
  1677.            searched    for passwords as a last    resort before
  1678.            prompting for one interactively.
  1679.  
  1680.       ~/.fetchmail
  1681.            lock file to help prevent concurrent runs (non-root
  1682.            mode).
  1683.  
  1684.       /var/run/fetchmail.pid
  1685.            lock file to help prevent concurrent runs (root mode,
  1686.            Linux systems).
  1687.  
  1688.       /etc/fetchmail.pid
  1689.            lock file to help prevent concurrent runs (root mode,
  1690.            systems without /var/run).
  1691.  
  1692.  
  1693.      EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  1694.       For correct initialization, _f_e_t_c_h_m_a_i_l    requires either    that
  1695.       both the USER    and HOME environment variables are correctly
  1696.       set, or that ggggeeeettttppppwwwwuuuuiiiidddd(3) be able to retrieve a password
  1697.       entry    from your user ID.
  1698.  
  1699.  
  1700.      SSSSIIIIGGGGNNNNAAAALLLLSSSS
  1701.       If a _f_e_t_c_h_m_a_i_l daemon    is running as root, SIGHUP wakes it up
  1702.       from its sleep phase and forces a poll of all    non-skipped
  1703.       servers (this    is in accordance with the usual    conventions
  1704.       for system daemons).
  1705.  
  1706.       If _f_e_t_c_h_m_a_i_l is running in daemon mode as non-root, use
  1707.       SIGUSR1 to wake it (this is so SIGHUP    due to logout can
  1708.       retain the default action of killing it).
  1709.  
  1710.  
  1711.  
  1712.  
  1713.      Page 26                          (printed 6/9/98)
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  1721.  
  1722.  
  1723.  
  1724.       Running _f_e_t_c_h_m_a_i_l in foreground while    a background fetchmail
  1725.       is running will do whichever of these    is appropriate to wake
  1726.       it up.
  1727.  
  1728.  
  1729.      BBBBUUUUGGGGSSSS AAAANNNNDDDD KKKKNNNNOOOOWWWWNNNN PPPPRRRROOOOBBBBLLLLEEEEMMMMSSSS
  1730.       The RFC822 parser used in multidrop mode chokes on some @-
  1731.       addresses that are technically legal but bizarre.  Strange
  1732.       uses of quoting and embedded comments    are likely to confuse
  1733.       it.
  1734.  
  1735.       Use of any of    the supported protocols    other than POP3    with
  1736.       OTP or RPA, APOP, KPOP, IMAP-K4, or ETRN requires that the
  1737.       program send unencrypted passwords over the TCP/IP
  1738.       connection to    the mailserver.     This creates a    risk that
  1739.       name/password    pairs might be snaffled    with a packet sniffer
  1740.       or more sophisticated    monitoring software.  Under Linux, the
  1741.       --interface option can be used to restrict polling to
  1742.       availability of a specific interface device with a specific
  1743.       local    IP address, but    snooping is still possible if (a)
  1744.       either host has a network device that    can be opened in
  1745.       promiscuous mode, or (b) the intervening network link    can be
  1746.       tapped.
  1747.  
  1748.       Send comments, bug reports, gripes, and the like to Eric S.
  1749.       Raymond <esr@thyrsus.com>.  An HTML FAQ is available at the
  1750.       fetchmail home page; surf to
  1751.       http://www.ccil.org/~esr/fetchmail or    do a WWW search    for
  1752.       pages    with `fetchmail' in their titles.
  1753.  
  1754.  
  1755.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  1756.       elm(1), mail(1), sendmail(8),    popd(8), imapd(8)
  1757.  
  1758.      AAAAPPPPPPPPLLLLIIIICCCCAAAABBBBLLLLEEEE    SSSSTTTTAAAANNNNDDDDAAAARRRRDDDDSSSS
  1759.       SMTP/ESMTP:
  1760.            RFC 821,    RFC 1869, RFC 1652, RFC    1870, RFC1983, RFC
  1761.            1985
  1762.  
  1763.       mail:
  1764.            RFC 822
  1765.  
  1766.       POP2:
  1767.            RFC 937
  1768.  
  1769.       POP3:
  1770.            RFC 1081, RFC 1225, RFC 1460, RFC 1725, RFC 1939
  1771.  
  1772.       APOP:
  1773.            RFC 1460, RFC 1725, RFC 1939
  1774.  
  1775.       RPOP:
  1776.  
  1777.  
  1778.  
  1779.      Page 27                          (printed 6/9/98)
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.      ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))           UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV          ffffeeeettttcccchhhhmmmmaaaaiiiillll((((1111))))
  1787.  
  1788.  
  1789.  
  1790.            RFC 1081, RFC 1225
  1791.  
  1792.       IMAP2/IMAP2BIS:
  1793.            RFC 1176, RFC 1732
  1794.  
  1795.       IMAP4:
  1796.            RFC 1730, RFC 1731, RFC 1732, RFC 2060, RFC 2061
  1797.  
  1798.       ETRN:
  1799.            RFC 1985
  1800.  
  1801.       OTP: RFC 1938
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812.  
  1813.  
  1814.  
  1815.  
  1816.  
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.      Page 28                          (printed 6/9/98)
  1846.  
  1847.  
  1848.  
  1849.